package com.java.dao;


import com.java.entity.House;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface HouseDAO extends JpaRepository<House,Integer> {
//    List<House> findAllByCategory(Category category);
//    List<House> findAllByTitleLikeOrAuthorLike(String keyword1, String keyword2);
@Query(value = "select address from fangtianxia where address like concat('%',?1,'%')", nativeQuery = true) // nativeQuery = true表示使用sql自己的方言查询，想查什么查什么， 按照字段数据类型返回就行了
List<House> findByArea(String area);

}
